/*
 * Copyright (c) 1997 - 2012 Rakuten, Inc. All Rights Reserved.
 * $Id$
 * Created on 2012/05/24
 */
package com.rakuten.api.mule.model;

import java.math.BigDecimal;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;
/**
 *
 * @author hayatsu
 */
@JsonPropertyOrder({
	"itemVariantPricingId",
	"shopId",
	"itemVariantId",
	"volumeMinimum",
	"currencyCode",
	"listPrice",
	"price",
	"duration"
})
@JsonAutoDetect
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class ItemPricing implements Durability{
	private String itemVariantPricingId;
	private String shopId;
	private String itemVariantId;
	private Integer volumeMinimum;
	private String currencyCode;
	private BigDecimal listPrice;
	private BigDecimal price;
	private ItemDuration duration;

	public String getCurrencyCode(){
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode){
		this.currencyCode=currencyCode;
	}

	public String getItemVariantId(){
		return itemVariantId;
	}

	public void setItemVariantId(String itemVariantId){
		this.itemVariantId=itemVariantId;
	}

	public String getItemVariantPricingId(){
		return itemVariantPricingId;
	}

	public void setItemVariantPricingId(String itemVariantPricingId){
		this.itemVariantPricingId=itemVariantPricingId;
	}

	public BigDecimal getListPrice(){
		return listPrice;
	}

	public void setListPrice(BigDecimal listPrice){
		this.listPrice=listPrice;
	}

	@Override
	public ItemDuration getDuration(){
		return duration;
	}

	@Override
	public void setDuration(ItemDuration duration){
		this.duration=duration;
	}

	@Override
	public boolean isLive(long currentTimeMillis){
		return duration==null||duration.isLive(currentTimeMillis);
	}

	public BigDecimal getPrice(){
		return price;
	}

	public void setPrice(BigDecimal price){
		this.price=price;
	}

	public String getShopId(){
		return shopId;
	}

	public void setShopId(String shopId){
		this.shopId=shopId;
	}

	public Integer getVolumeMinimum(){
		return volumeMinimum;
	}

	public void setVolumeMinimum(Integer volumeMinimum){
		this.volumeMinimum=volumeMinimum;
	}

}
